package com.clothing.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @ClassName: LeaveMessageReply 
 * @Description: TODO(Entity) 
 * @author Charles 
 * @date 2017年10月18日 上午9:27:43 
 * @version 1.0
 */
@Entity
@Table(name = "leave_message_reply")
public class LeaveMessageReply extends BaseEntity
{
    /**
     * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
     */
    private static final long serialVersionUID = 711242287930660002L;

    private LeaveMessage leaveMessage;

    private String content;

    private User sender;
    
    private User receiver;
    
    private Boolean isRead;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "leave_message", nullable = false)
    public LeaveMessage getLeaveMessage()
    {
        return leaveMessage;
    }

    public void setLeaveMessage(LeaveMessage leaveMessage)
    {
        this.leaveMessage = leaveMessage;
    }
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "sender", nullable = false)
    public User getSender()
    {
        return sender;
    }

    public void setSender(User sender)
    {
        this.sender = sender;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "receiver", nullable = false)
    public User getReceiver()
    {
        return receiver;
    }

    public void setReceiver(User receiver)
    {
        this.receiver = receiver;
    }

    @Column(name = "content", nullable = false)
    public String getContent()
    {
        return content;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    @Column(name = "is_read", nullable = false)
    public Boolean getIsRead()
    {
        return isRead;
    }

    public void setIsRead(Boolean isRead)
    {
        this.isRead = isRead;
    }
}
